package contactbook.service;

import java.util.Set;

import contactbook.dao.AccountDAOInterface;
import contactbook.dao.GroupDAOInterface;
import contactbook.model.Group;

public interface GroupServiceInterface {
	
	public static String JNDI = "ContactBookEar/GroupService/remote";
	
	public void login(String login, String password);
	public void logout();
	
	public Group add(Group group);
	public void update(Group group);
	public void delete(int groupId);
	
	public Group getGroupById(int groupId);
	public Group getGroupByName(String name);
	public Set<Group> getGroups();
	
	public boolean isLogged();
	
	/* Change DAO : for business layer tests */
	public void setDAO(GroupDAOInterface groupDao, AccountDAOInterface accountDao);
}
